// Ofri Keidar 302933981 group 05

package controller;

import model.database.DBException;

/**
 * Interface for possible transactions for Administrator user
 */
public interface AdministratorController {
	
	/**
	 * Adds a new record with given user-name, permission and default password.
	 * Cannot add user if there is another user record with given user-name, password and permission
	 * @param userName- user-name for the new record
	 * @param permission- permission for the new record
	 * @return True if could add a new user-name record, False if not
	 * @throws DBException if had errors connecting to database
	 */
	public boolean addUserRecord(String userName,
			CommonValues.permissions permission) throws DBException;
	
	/**
	 * Gets employee details and adds used an employee to store database.
	 * New employee's type if defined by the permission.
	 * Default user name is employee's number, and password is set to default password.
	 * Cannot add employee if there is another employee record with given number
	 * @param number- new employee's number
	 * @param name- new employee's name
	 * @param userName- new employee's user-name
	 * @param permission- new emploee's permission
	 * @return True if could add a new employee with given details, False if not
	 * @throws DBException if had errors connecting to database
	 */
	public boolean addEmployee(int number, String name, String userName,
			CommonValues.permissions permission) throws DBException;
}